//
//  JFSocketResultVo.h
//  JFBase
//
//  Created by Alan Wang on 2018/11/22.
//  Copyright © 2018 Alan Wang. All rights reserved.
//

#import <JFBase/JFBase.h>
typedef NS_ENUM(NSInteger, DataParserActionType) {
    DataParserActionType_None = 0,//不做任何事情
    DataParserActionType_Read = 1,//再次读取
    DataParserActionType_Write = 2,//写数据
    DataParserActionType_ReadWrite = 3,//读写数据
    DataParserActionType_Complete = 999 //完成直接回调
};

typedef NS_ENUM(NSInteger, DataReadType) {
    DataReadType_None = 0,//默认的读取
    DataReadType_Length = 1,//按长度读取
    DataReadType_EndChar = 2//按分隔符读取
};



@interface JFSocketResultVo : JFResultVo
//返回的数据的执行事件
@property(nonatomic,assign) DataParserActionType actionType;
//数据标识
@property(nonatomic,assign) NSInteger tag;
//读数据方式 DataParserActionType = DataParserActionType_Read才有效
@property(nonatomic,assign) DataReadType readType;
//读数据时 需要的参数 DataReadType =DataReadType_Length length 该值有效
@property(nonatomic,assign) NSInteger length;
//DataParserActionType = DataParserActionType_Write 时 为发送的数据  DataParserActionType DataParserActionType_Read 且 DataReadType = DataReadType_EndChar 时为分隔符的二进制
@property(nonatomic,assign) NSData *  data;

//默认为-1；
@property(nonatomic,assign) NSTimeInterval timeOut;

@end
